package com.wooophone.buyi.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class SystemListener implements ServletContextListener {

	long startTime=0;
	
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		System.out.println("........程序关闭.......");
		System.out.println("总共运行了："+(System.currentTimeMillis()-startTime)+"毫秒");
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		System.out.println("........程序启动.......");
		startTime=System.currentTimeMillis();
	}
}
